<%--
  Created by IntelliJ IDEA.
  User: HUAWEI
  Date: 2024/1/2
  Time: 21:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<nav class="navbar navbar-dark bg-info my">
    <h3 class="navbar-brand">&nbsp; 欢 迎 来 到 新 闻 管 理 系 统 ！</h3>
    <%--    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>--%>
    <%--   <div class="collapse navbar-collapse" id="navbarNavDropdown">
           <ul class="navbar-nav">
               <li class="nav-item active">
                   <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
               </li>
               <li class="nav-item">
                   <a class="nav-link" href="#">Features</a>
               </li>
               <li class="nav-item">
                   <a class="nav-link" href="#">Pricing</a>
               </li>--%>
    <%--<li class="nav-item dropdown">
        <a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-expanded="false">
            Dropdown link
        </a>
        <div class="dropdown-menu">
            <a class="dropdown-item" href="#">Action</a>
            <a class="dropdown-item" href="#">Another action</a>
            <a class="dropdown-item" href="#">Something else here</a>
        </div>
    </li>--%>
    <%--        </ul>
        </div>--%>
    <%--下拉菜单栏--%>
    <div class="nav-item dropdown my-lg-0" <%--style="position: absolute;top:-8px;left: -3px"--%>>
        <%--使用el表达式判断域对象中是否为空，若为空显示‘未登录’--%>
        ${not empty Admin ? "<a class=\"nav-link dropdown-toggle\" href=\"#\" role=\"button\" data-toggle=\"dropdown\" aria-expanded=\"false\">".concat(Admin.userName).concat("，你好</a>")
                :"<a class=\"nav-link dropdown-toggle\" href=\"#\" role=\"button\" data-toggle=\"dropdown\" aria-expanded=\"false\">未登录</a>"
                }

        <%--下拉菜单栏内容--%>
        <ul class="dropdown-menu">
            <%--使用el表达式判断域对象中是否为空，若为空显示‘登录、注册’--%>
            ${not empty Admin ? "<li><a class=\"dropdown-item\" href=\"#\">用户信息</a></li><li><a class=\"dropdown-item\" href=\"LogOff\">退出登录</a></li>"
                    :"<li><a class=\"dropdown-item\" href=".concat(pageContext.request.contextPath).concat("/login>登 录</a>").concat("</li><li><a class=\"dropdown-item\" href=").concat(pageContext.request.contextPath).concat("/register>注 册</a></li>")
                    }
        </ul>
        <%--    <form class="form-inline my-2 my-lg-0">
                <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
                <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
            </form>--%>
</nav>

<%--<div class="d-flex align-items-stretch">
    <div class="col-2 bg-light">
        &lt;%&ndash;    <div class="col-auto bg-dark">&ndash;%&gt;
        <div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical">
            <button href="${pageContext.request.contextPath}/admin/index.jsp" style="height: 50px" class="nav-link active" id="v-pills-home-tab" data-toggle="pill"
                    data-target="#v-pills-home" type="button" role="tab" aria-controls="v-pills-home"
                    aria-selected="true">首页
            </button>
            <button href="${pageContext.request.contextPath}/admin/newsManagement.jsp" style="height: 50px" class="nav-link" id="v-pills-profile-tab" data-toggle="pill"
                    data-target="#v-pills-profile" type="button" role="tab" aria-controls="v-pills-profile"
                    aria-selected="false">新闻管理
            </button>
            <button href="${pageContext.request.contextPath}/admin/userManagement.jsp" style="height: 50px" class="nav-link" id="v-pills-messages-tab" data-toggle="pill"
                    data-target="#v-pills-messages" type="button" role="tab" aria-controls="v-pills-messages"
                    aria-selected="false">用户管理
            </button>
            &lt;%&ndash;                        <a style="height: 50px" class="nav-link" id="v-pills-settings-tab" data-toggle="pill"
                                            data-target="#v-pills-settings" type="button" role="tab" aria-controls="v-pills-settings"
                                            aria-selected="false">删除
                                    </a>&ndash;%&gt;
        </div>
    </div>
    &lt;%&ndash;                <div class="col-10"></div>&ndash;%&gt;
    &lt;%&ndash;<div class="col-10">
        &lt;%&ndash;首页&ndash;%&gt;
        <div class="tab-content" id="v-pills-tabContent">
            <div class="tab-pane fade show active" id="v-pills-home" role="tabpanel" aria-labelledby="v-pills-home-tab">

            </div>
            &lt;%&ndash;新闻管理&ndash;%&gt;
            <div class="tab-pane fade" id="v-pills-profile" role="tabpanel" aria-labelledby="v-pills-profile-tab">
                &lt;%&ndash;                            <%@include file="newsManagement.jsp" %>&ndash;%&gt;
            </div>
            &lt;%&ndash;用户管理&ndash;%&gt;
            <div class="tab-pane fade" id="v-pills-messages" role="tabpanel" aria-labelledby="v-pills-messages-tab">
                &lt;%&ndash;                            <%@include file="userManagement.jsp" %>&ndash;%&gt;
            </div>
            <div class="tab-pane fade" id="v-pills-settings" role="tabpanel" aria-labelledby="v-pills-settings-tab">
                ...
            </div>
        </div>
    </div>&ndash;%&gt;
</div>--%>
